package com.fingard.dsp.bank.directbank.wjzf02.hessian;

import java.net.MalformedURLException;

import cacps.DownloadFileService;

import com.caucho.hessian.client.HessianProxyFactory;


public class CCPMDownloadClient {
	static DownloadFileService downloadFileService;

	public DownloadFileService getDownloadFileService(String p_url) {
		if(downloadFileService!=null)
			return downloadFileService;
		//系统测试环境
		//String url = "http://121.28.179.5:12342/cacps/downloadfileServer";
		
		HessianProxyFactory factory = new HessianProxyFactory();
		DownloadFileService downloadFileService = null;
		try {
			downloadFileService = (DownloadFileService) factory.create(
					DownloadFileService.class, p_url);
		} catch (MalformedURLException e) {
			System.out.println("occur exception: " + e);
		}
		return CCPMDownloadClient.downloadFileService = downloadFileService;
	}

}
